<?php

namespace View;

class MovieFeedView {
	
	//Returnerar lista med filmer
	public function showMovieFeed(\Model\MovieArray $movieArray,$user) {
               
                $ret = "";
				$ret .="<div id='feed'>";
                $ret .= "<ul>";
				
                foreach ($movieArray->get() as $movie) {
               		$ret .= "<li>" . "<p>Posted by: ".$movie->getUsername()."</p>" . "<p>Title: ". $movie->getName() ."</p>".
               		 "<p>Review: ". $movie->getReview()."</p>"."<p>Rating: ".$movie->getRating(). "</p>".
               		 "<img src='images/".$movie->getImage()."' width='200' />"."</li>";
                }
                $ret .= "</ul>";
                $ret .="</div>";
                return $ret;
     }
	
	//Felmeddelande
	public function NoFriends() {
		$message = "You have not added any friends";
		return $message;
	}
	
}